package cn.com.qtgl.init.tenant.model.entity;

import cn.melonlib.cores.commons.model.entity.TenantRecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("三元组信息")
@Entity(name = "LocalPosition")
@Table(name = "init_local_position")
public class LocalPosition extends TenantRecordEntity {

    @ModelComment("接口ID")
    private String apiId;

    @ModelComment("部门信息")
    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.LAZY)
    @JoinColumn(name = "dept_id")
    private LocalDepartment dept;

    @ModelComment("岗位信息")
    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.LAZY)
    @JoinColumn(name = "post_id")
    private LocalPost post;

    @ModelComment("关联用户")
    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    private LocalUser user;

    @ModelComment("编码")
    private String code;

    @ModelComment("是否禁用")
    private Boolean disabled;

    @ModelComment("开始时间")
    private Long startTime;

    @ModelComment("结束时间")
    private Long endTime;

    @ModelComment("时间戳")
    private Long timestamp;

    @ModelComment("描述")
    private String description;

    @ModelComment("标签")
    private String tags;


    @ModelComment("是否激活")
    private Boolean active;

    @ModelComment("激活时间")
    private Long activeTime;

    @ModelComment("排序")
    @Column(name = "c_index")
    private Integer index;

    @ModelComment("身份卡号")
    private String cardNo;

    @ModelComment("身份类型")
    private String cardType;
}
